// 入驻审核
export const EnumSettledAuditStatus = [
  { label: "待审核", value: 0, color: "primary" },
  { label: "已通过", value: 1, color: "success" },
  { label: "已驳回", value: 2, color: "error" },
];

// 活动审核状态
export const EnumActivityAuditStatus = [
  { label: "待审核", value: 0, color: "primary" },
  { label: "已通过", value: 1, color: "success" },
  { label: "已驳回", value: 2, color: "error" },
];

// 活动商家押金来源
export const EnumDepositFrom = [
  { label: "线上支付", value: 1, color: "primary" },
  { label: "线下支付", value: 2, color: "success" },
];

// 押金状态
export const EnumActivityDepositStatus = [
  { label: "待支付", value: 0, color: "warning" },
  { label: "已支付", value: 1, color: "success" },
  { label: "已退回", value: 2, color: "info" },
];

// 活动状态：活动状态 0 未开始 1 进行中 2 已结束
export const EnumActivityStatus = [
  { label: "未开始", value: 0, color: "primary" },
  { label: "进行中", value: 1, color: "success" },
  { label: "已结束", value: 2, color: "info" },
];

// 活动状态：活动状态 0 未开始 1 进行中 2 已结束
export const EnumActivityType = [
  { label: "现场活动", value: 1 },
  { label: "到店活动", value: 2 },
];

// 票券来源
export const EnumTicketSnFrom = [
  { label: "平台赠送", value: 1, color: "lime" },
  { label: "自主购票", value: 2, color: "cyan" },
  { label: "用户转赠", value: 3, color: "purple" },
];

// 票券状态
export const EnumTicketSnState = [
  { label: "未使用", value: 1, color: "primary" },
  { label: "可使用", value: 2, color: "success" },
  { label: "已使用", value: 3, color: "info" },
  { label: "转赠中", value: 4, color: "waring" },
  { label: "已转赠", value: 5, color: "info" },
  { label: "已过期", value: 6, color: "info" },
  { label: "已禁用", value: 7, color: "danger" },
];

// 票券禁用状态
export const EnumTicketSnOpen = [
  { label: "禁用", value: 0, color: "danger" },
  { label: "正常", value: 1, color: "success" },
];

// 票券下面优惠券状态
export const EnumTicketSnCouponStatus = [
  { label: "未使用", value: 1, color: "primary" },
  { label: "已使用", value: 2, color: "success" },
  { label: "已失效", value: 3, color: "info" },
];

// Banner类型
export const EnumBannerType = [
  { label: "不跳转", value: 0 },
  { label: "小程序内跳转", value: 1 },
  { label: "跳转其他小程序", value: 2 },
  { label: "h5", value: 3 },
  { label: "微信公众号文章", value: 4 },
];

// 优惠券大类（标签）
export const EnumCouponType = [
  {
    label: "体验装兑换券(兼容显示)",
    value: 0,
    color: "warning",
    disabled: true,
  },
  { label: "体验装兑换券", value: 1, color: "warning" },
  { label: "到店优惠券", value: 2, disabled: true, color: "primary" },
  { label: "现场券", value: 3, color: "danger" },
];

// 优惠券类型
export const EnumCouponCategory = [
  {
    label: "兑换券",
    value: 1,
    desc: "直接绑定指定商家或直接赠送某个商品",
    linkTypeValue: [1],
  },
  {
    label: "折扣券",
    value: 2,
    desc: "为某些商品指定折扣额度",
    unit: "%",
    disabled: true,
  },
  {
    label: "满额立减",
    value: 3,
    desc: "单笔订单满足金额立减",
    unit: "元",
    linkTypeValue: [3],
  },
  {
    label: "换购促销",
    value: 4,
    desc: "消费满足要求享低价换购",
    disabled: true,
  },
  {
    label: "搭赠促销",
    value: 5,
    desc: "为畅销品搭赠滞销品，或畅销品搭赠新品",
    disabled: true,
  },
  {
    label: "第二件折扣",
    value: 6,
    desc: "指定商品第二件折扣",
    unit: "%",
    disabled: true,
  },
  {
    label: "套餐促销",
    value: 7,
    desc: "组合对应商品享受套餐活动价",
    disabled: true,
  },

  // { label: "梯队优惠", value: 3, desc: "单笔订单按梯度金额或数量享受优惠" },
];

// 优惠券状态
export const EnumCouponStatus = [
  { label: "正常", value: 1, color: "success" },
  { label: "禁用", value: 2, color: "error" },
];

export const EnumCouponExemptionType = [
  { label: "折扣", value: 1 },
  { label: "立减", value: 2 },
];

// 通用的状态
export const EnumStatus = [
  { label: "正常", value: 1, color: "success" },
  { label: "禁用", value: 2, color: "error" },
];

// 规格：是否是时间格式
export const EnumSpecIsTime = [
  { label: "是", value: 1, color: "success" },
  { label: "否", value: 2, color: "info" },
];

// 场次类型
export const EnumEtimeType = [
  { label: "单场次", value: 1 },
  { label: "多场次", value: 2 },
  { label: "全场通用", value: 3 },
];

// 权益包规则类型
export const EnumPackageType = [
  { label: "时间规则", value: 1 },
  { label: "核销规则", value: 2 },
];

interface EnumRuleOptions {
  value: number | string;
  label: string;
  disabled?: boolean;
  children?: Omit<EnumRuleOptions, "children">[];
  unit?: string;
}

export const EnumRuleOptions: EnumRuleOptions = [
  {
    value: 1,
    label: "时间规则",
    children: [
      { label: "从领取时生效", value: "1" },
      { label: "固定时间段生效 ", value: "2" },
    ],
    disabled: true,
  },
  {
    value: 2,
    label: "核销规则",
    children: [
      { label: "所属活动报名品牌可核销", value: "1" },
      { label: "指定品牌可核销 ", value: "2", disabled: true },
      { label: "指定品牌不可核销  ", value: "3", disabled: true },
      { label: "全部入驻品牌可核销 ", value: "4", disabled: true },
    ],
  },
  // {
  //   value: 2,
  //   label:"活动规则"
  // },
  {
    value: 4,
    label: "支付优惠规则",
    children: [
      { label: "最低消费金额", value: "1", unit: "元" },
      // （折扣预留）
      // { label: "最高优惠金额", value: "2" },
    ],
  },
];

// 订单状态 1 待支付 2 已支付 3 已取消 4 已退款
export const EnumOrderStatus = [
  { label: "待支付", value: 1, color: "info" },
  { label: "已支付", value: 2, color: "success" },
  { label: "已取消", value: 3, color: "warning" },
  { label: "已退款", value: 4, color: "error" },
];

// 交易状态 1:待支付 2:拉起支付 3:已支付 4:已取消 5:已退款
export const EnumTradeStatus = [
  { label: "待支付", value: 1, color: "info" },
  { label: "支付中", value: 2, color: "success" },
  { label: "已支付", value: 3, color: "warning" },
  { label: "已取消", value: 4, color: "error" },
  { label: "已退款", value: 5, color: "error" },
];

// 退款状态
export const EnumRefundStatus = [
  { label: "未退款", value: 0, color: "info" },
  { label: "部分退款", value: 1, color: "warning" },
  // { label: "全额退款", value: 2, color: "error" },
  { label: "退款", value: 2, color: "error" },
];

// 支付方式
export const EnumPayMode = [
  { label: "微信支付", value: "wechat_pay", color: "success" },
  { label: "支付宝", value: "ali_pay", color: "primary" },
];

// 职工身份类型
export const EnumStaffType = [
  { label: "管理员", value: 1 },
  { label: "店长", value: 2 },
  { label: "店员", value: 3 },
];

// 职工状态
export const EnumStaffStatus = [
  { label: "在职", value: 1, color: "success" },
  { label: "禁用", value: 2, color: "info" },
  { label: "离职", value: 3, color: "warning" },
];
